Repository navigation
pkgs/id crate split step 5b: extract id-worlds core — world, sessions, sandbox, directory cluster (#4408) - #8768
Conversation
…, sandbox, directory cluster (#4408)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Nix: |
Step 5b of the pkgs/id crate split (#4408; step 5a = #8762): move the world runtime core into
id-worlds. Stacked on step 5a and rebased onto current main.What moved (implementation exists only in
pkgs/id/crates/id-worlds; the facade re-exports every historicalid::path):world/(mod, core, actor, replica, replication + receiver, handle, clock, hotness, metrics, signed, upgrade, util, tests),world_session/,world_store,world_net,world_hub,world_compile,world_native,world_fixture,world_records,shell_contract(+ its tests), andsandbox— the wasmtime dependency now lives insideid-worlds(id-worlds/sandbox); the facadesandboxfeature forwards to it and the facade's ownwasmtimedependency is gone.session_host— theSessionHost/ArtifactSinkimpls for the hub and directory. The orphan rule puts them here: the trait isid-sync's and the types are now this crate's (they sat in the facade only while the hub and directory did).directory,directory_auth,directory_view,directory_mail, ~9,600 lines). This is the seam-10 resolution for this step, and it is the consumer-side move (the seam-6 pattern from 5a):WorldCoreholds theDirectory(world/core.rs:208), the world actor executesdirectory_view::runagainst it,world_session's service API namesCaller/DirectoryAction/DirectoryOutcome, andworld_storepersists the directory beside the journal. A trait inversion here would have meant re-typingWorldCore's publicdirectory()/directory_mut()accessors (used byserver_configandweb) — a public-API redesign, which the step's stop rule reserves. Moving the cluster changes no API and no behaviour: the facade re-exportsid::directory*unchanged. Seam 10's remaining half is unchanged by this: step 6'sid-directoryextraction must still invert or re-homeWorldCore's hold on the directory, exactly as it would have had to from the facade — recorded on pkgs/id crate split — step 5: extract id-worlds #4408 and for pkgs/id crate split — step 6: extract id-directory, then id-web #4409.directory_logdoes not move (nothing in the world family names it; it is step 6's).test_forgeries(94-line signature-fixture leaf) →id-core, gated#[cfg(any(test, feature = "test-utils"))]like id-core's other test seams: the directory tests that move need it, and the facade's remaining users take it from there too — one canonical home, no duplication.Also: six items the facade's remaining modules use across the new boundary were widened
pub(crate)→pub(Directory::apply,directory::hex_to_array,WorldHandle::replication_feed,WorldProtocol::abuse_handle,world::EmptyWorldProgram,world_session::MAX_ADMIN_TOKEN_BYTES— the last via a single-name re-export, not a group widening);tempfileis a real dependency ofworld_compileand is declared as one; assetinclude_*paths andCARGO_MANIFEST_DIRexample paths in moved files gained the two directory levels the files descended (the intra-treeworld/tests.rs→world_session/mod.rssource include is unchanged, as the tree layout is mirrored);id-worldsdev-deps declare theid-sync/test-utilsseam its directory tests use, so the crate's tests compile standalone.Left for step 5c:
world_dev,world_doctor,world_ssh,world_replication_net(nothing in this PR's moved set names them; they name this set, so they follow).Verification (laptop, fresh
CARGO_TARGET_DIRs; counting run = full workspacecargo test --no-fail-fastwithtests/probe_attestation_sign.rsset aside, as in 5a, plus the feature-gateddht_testnet):850f2fce31): 73 suites, 3,719 passed / 1 failed / 33 ignored; the 1 failure is the knownframes::tests::byte_refusal_…(pkgs/id: frames byte_refusal test fails deterministically on main (RequestTooLarge vs BudgetExhausted) #8620).id-worldslib 47 → 796 passed / 2 ignored;id-corelib 364 → 367 passed (thetest_forgeriestests' new home); every other suite identical.print_fuel_baselineoutput byte-identical before/after — 72 lines, sha25659cfad49c7553c8309a8b40b23405321399bb76bb741acaeb90f78570f45c32c; (2) theFUEL_BUDGETStable literal extracted from the movedcrates/id-worlds/src/sandbox.rsdiffed against unmodified main's — byte-identical (the file's own sha256 changed to4c3b8edb…from the include-path edits, which the step brief names as expected, not a canary failure); (3) the checked-in fuel tests pass (in theid-worldssuite, 796 passed / 0 failed).--no-default-features --features world(theid-libderivation's shape) fails identically on main and this branch (2 errors,src/boards.rs:1998,2000).--no-default-featuresis a named delta: main fails it with 28 errors (the facade's ungatedworld_compile/world_hubreferenced cfg-gated siblings); this branch passes it — the moved modules' cfg blocks are crate-local now. No shipped derivation uses that shape (id-lib= no-default +sandbox,world;id-webaddsweb,ssh), and the default build is unchanged.src/(only re-export shims;src/world/,src/world_session/,src/shell_contract/are gone).nix build ./pkgs/id#id-lib— result posted as a PR comment (expected parity: build phase passes, check phase fails only on the pre-existing probe compile error).🤖 Agent note — crate-split step 5b, issue #4408.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.